package com.shunli.cterminal.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.examples.core.mybatis.base.BaseSafeEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @ClassName: SystemOrder
 * @Description: TODO
 * @Author: DAIYALU
 * @Date: 2024/5/28
 * @Version: 1.0
 */
@Data
@TableName("system_order")
@EqualsAndHashCode(callSuper = true)
public class SystemOrder extends BaseSafeEntity {

    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    private String uid;

    private String orderNo;

    /**
     * 订单分类 0-在线类 1-销售类
     */
    private String orderCategory;

    /**
     * 订单标记
     * 0-主订单
     * 1-子订单
     */
    private String orderFlag;

    /**
     * 应用编码
     */
    private String appCode;

    /**
     * 商城编码
     */
    private String mallCode;

    /**
     * 项目方编码
     */
    private String projectCode;

    /**
     * 推广渠道编码
     */
    private String adChannelCode;

    /**
     * 投手ID
     */
    private Long pitcherId;

    private String paymentMode;

    private BigDecimal receivableAmount;

    private BigDecimal depositAmount;

    private BigDecimal discountAmount;

    private BigDecimal actualAmount;

    /**
     * 退款金额
     */
    private BigDecimal refundAmount;

    private Long customerId;

    private Integer customerNo;

    private Long customerClueId;

    private Long sellerId;

    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private String consigneeInfo;

    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private String deliveryFlag;

    private String status;

    private String domain;

    private Long adAccountId;

    private Long templateId;

    private String extInfo;

    private String phone;
    private String email;

    private String wxOpenId;

    private LocalDateTime payTime;

    /**
     * 售后状态
     * 0-待审批
     * 1-审批中
     * 2-已完成
     * 3-已拒绝
     */
    private String asStatus;

    private String shipStatus;

    private String jushuitanOId;

    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private Long asId;

    private String trackNo;

    private String trackCode;
    private String trackCompanyName;
    private Boolean subscribeFlag;
    private String trackStatus;
    private LocalDateTime signOnTime;

    private Integer shopId;

    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private LocalDateTime partShipTime;

    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private LocalDateTime shipTime;
    private LocalDateTime cancelTime;

    /**
     * 是否已分配企业微信
     * 0-未分配
     * 1-已分配
     */
    private String allocationWecomFlag;

    private String remark;

    private Integer smsSendNum;

    private String payChannel;

    private String mchId;

    /**
     * 处理标记 0-未处理 1-处理中 2-已处理
     */
    private String handleTag;

    /**
     * 处理时间
     */
    private LocalDateTime handleTime;

    private String lastPerfectStep;

    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private String attachment;

    /**
     * 1-一线 2-二线 3-其他
     */
    private Integer label;

    private Long deptId;

    private String platformCode;

    /**
     * 发货类型
     * 0-自动发货
     * 1-人工发货
     * 2-短信发货
     */
    private String orderShipType;

    private String autoRefundFlag;

    /**
     * 子订单分类 1-赠品订单 2-补发商品订单
     */
    private String subOrderType;
}
